<extend name="Public/common"/>
<block name="content">
<div class="page_content_offset">
	<div class="container">
		<div class="row clearfix">
			<!--left content column-->
			<section class="col-lg-9 col-md-9 col-sm-9">
				<h2 class="tt_uppercase color_dark m_bottom_25">用户注册</h2>
				<p class="m_bottom_10">请完整填写以下信息进行注册。<span class="scheme_color">*</span></p>				
				<div class="row clearfix">
					<div class="col-lg-7 col-md-7 col-sm-7">
						<form class="form-horizontal">
							<div class="form-group">
                              	<label class="col-lg-2 control-label">用户名<span class="scheme_color">*</span></label>
                              	<div class="col-lg-8">
                                 	<input type="text" name="username"  class="form-control" placeholder="用户名">
                                 	<span class="help-block">4-15个字符,可使用字母、数字！</span> 
                              	</div>                               	                           	
                           	</div>
                           	
                           	<div class="form-group">
                              	<label class="col-lg-2 control-label">邮箱<span class="scheme_color">*</span></label>
                              	<div class="col-lg-8">
                                 	<input type="email" name="email" class="form-control" placeholder="邮箱">
                                 	<span class="help-block">使用正确的E-mail,方便以后联系您！</span> 
                              	</div>                               	                           	
                           	</div>
                           	
                           	<div class="form-group">
                              	<label class="col-lg-2 control-label">密码<span class="scheme_color">*</span></label>
                              	<div class="col-lg-8">
                                 	<input type="password" class="form-control" name="password"  placeholder="密码">
                                 	<span class="help-block">6~18个字符,区分大小写！</span> 
                              	</div>                               	                           	
                           	</div>
                           	
                           	<div class="form-group">
                              	<label class="col-lg-2 control-label">确认密码<span class="scheme_color">*</span></label>
                              	<div class="col-lg-8">
                                 	<input type="password" name="repassword" class="form-control" placeholder="再次输入密码">
                                 	<span class="help-block">确认密码必须与密码相同！</span> 
                              	</div>                               	                           	
                           	</div>
                           	
                           	 <div class="form-group">
                  				<label class="control-label col-lg-2">验证码<span class="scheme_color">*</span></label>
                  				<div class="col-lg-8">
                                 	<input type="text" id="inputPassword" class="form-control" name="verify">
                  				</div>
                			</div>
                			<div class="form-group">
                  				<label class="control-label col-lg-2"></label>
                  				<div class="col-lg-8">
                    				<img class="verifyimg reloadverify" alt="点击切换" src="<{:U('verify')}>" style="cursor:pointer;">
                  				</div>
                			</div>
                           	
							<div class="form-group">
                              <div class="col-lg-offset-2 col-lg-10">
                                 <button class="button_type_4 bg_light_color_2 r_corners mw_0 tr_all_hover color_dark">立即注册</button>
                              </div>
                           	</div>
                           
						
						</form>
					</div>
					<div class="col-lg-5 col-md-5 col-sm-5 d_xs_none sidebar_content">
						<div class="custom_scrollbar">
							<h5 class="fw_medium m_bottom_10">服务条款（注册前必读）<span class="scheme_color">*</span></h5>
							<ul class="vertical_list_type_5 d_inline_b">
								<{:replace_sys_variate(C('REG_AGREE'))}>
							</ul>
						</div>
					</div>
				</div>
				
			</section>
			<aside class="col-lg-3 col-md-3 col-sm-3">
				<figure class="widget shadow r_corners wrapper m_bottom_30">
					<figcaption>
						<h3 class="color_light">还可以用以下方式登录</h3>
					</figcaption>
					<div class="widget_content">
						暂时未整合
					</div>
				</figure>
			</aside>
		</div>
	</div>
</div>
</block>
<block name="player"><include file="Player/default"/></block> 
<block name="script">
	<script type="text/javascript">
    	$(document)
	    	.ajaxStart(function(){
	    		$("button:submit").addClass("log-in").attr("disabled", true);
	    	})
	    	.ajaxStop(function(){
	    		$("button:submit").removeClass("log-in").attr("disabled", false);
	    	});


    	$("form").submit(function(){
    		var self = $(this);
    		$.post(self.attr("action"), self.serialize(), success, "json");
    		return false;

    		function success(data){
    			if(data.status){
    				infoAlert(data.info + ' 页面即将自动跳转~',true);
                   	setTimeout(function(){
                        if (data.url) {
                            location.href=data.url;
                        }
                    },1500);
    			} else {
    				infoAlert(data.info);
    				//刷新验证码
    				$(".reloadverify").click();
    			}
    		}
    	});

		$(function(){
			var verifyimg = $(".verifyimg").attr("src");
            $(".reloadverify").click(function(){
                if( verifyimg.indexOf('?')>0){
                    $(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
                }else{
                    $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
                }
            });
		});
	</script>
</block>